/** 暂停倒计时 */
export default class PauseTimer implements TimeComponent.PauseTimer {


    time() {
        if (this.pauseTime) {
            if (--this.pauseTime) {
                return true
            } else {//暂停倒计时结束
                this.end()
            }
        }
        return false
    }
    end() {
        if (this.finallCall)
            this.finallCall()
        this.finallCall = undefined
    }
    constructor(
        /** 最终都要执行 */
        private finallCall?: () => void,
        /** */
        private pauseTime = 0) {

    }
}